<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","head","sysx_m"); ?>
<style>
.right_main iframe{width:90% !important;}
</style>


<div class="bg pad15">
    <div class="nytitle"><a href="/" target="_blank">首页</a> >
        <?php echo catpos($catid,$s='>');?>
    </div>
 <div class="nytitle" style="background: none;color:#fff;height: auto;margin-left:auto;padding: 0 2% 1% 2%">
        <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=8a51790d565756dbb71c83fd89381949&action=category&catid=4&order=listorder+asc\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'category')) {$data = $content_tag->category(array('catid'=>'4','order'=>'listorder asc','limit'=>'20',));}?>
        <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
        <a  href="<?php echo $r['url'];?>" class="layui-btn layui-btn-mini" style="display:inline-block;width:24%;color:#fff;background:#ccc;margin-top: 5px;margin-left:0 !important;<?php if($catid==$r[catid]) { ?>background-color:#2f82ff;color:#fff<?php } ?>"><?php echo $r['catname'];?></a>
        <?php $n++;}unset($n); ?>
        <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
    </div>
    <div class="right_main" style="width: 100%;padding:20px 5%;margin:auto;background:#fff;">
        <div class="agent_con">
            <?php if($catid==13) { ?>
            <div class="neirong">
                <p style="font-size: 25px;margin-top: 10px;color:#004693">在线留言</p>
                <div class="nei">
                    <form class="layui-form" id="form" action="index.php?m=webman&c=liuyan&a=add" method="post">
                        <table class="layui-table">
                            <tr class="layui-input-inline">
                                <td style="width: 100px">姓名：</td>
                                <td><input class="layui-input" name="username" type="text"></td>
                            </tr>
                            <tr class="layui-input-inline" style="display: block">
                                <td style="width: 100px">手机号码：</td>
                                <td><input class="layui-input" name="phone" type="text"></td>
                            </tr>
                            <tr class="layui-input-inline" style="display: block">
                                <td style="width: 100px">QQ号码：</td>
                                <td><input class="layui-input" name="qq" type="text"></td>
                            </tr>
                            <tr class="layui-input-inline">
                                <td style="display: block"><textarea class="layui-textarea" name="content" placeholder="请留下您的需求，谢谢" id="" cols="60" rows="8"></textarea></td>
                            </tr>
                            <tr>
                                <td>验证码：<input type="text" name="code" class="layui-input" style="width: 100px"><?php echo form::checkcode('code_img', '4', '14', 100, 30);?></td>

                            </tr>
                            <tr class="layui-input-block" style="width: 200px!important;">
                                <input type="hidden" name="dosubmit" value="1">
                                <input type="hidden" name="ip" value="<?php echo ip();?>">
                                <td style="border: none;"><button type="button" class="layui-btn btn" style="background-color:#2f82ff;">提交</button></td>
                            </tr>

                        </table>
                    </form>
                </div>
            </div>
            <script>
                layui.use('layer',function(){
                    var layer=layui.layer;
                    $(".btn").click(function () {
                        $.ajax({
                            url:"index.php?m=webman&c=liuyan&a=add",
                            type:"post",
                            data:$("#form").serialize(),
                            success:function(msg){
                                if(msg=='ok'){
                                    alert('提交成功，谢谢！');
                                    location.reload()
                                }else if(msg=='fail'){
                                    alert('提交失败，请联系管理员',{icon:2});
                                }else{
                                    alert(msg,{icon:2})
                                }
                            }
                        })
                    });

                })
            </script>
			<style>
				.layui-input-inline{
					width:100%;
				}
			</style>
            <?php } else { ?>
            <div class="neirong">
                <?php if($content) { ?>
						<?php echo $content;?>
						<?php } else { ?>
						<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=8bc53a4b2e46cbc59b7370c7bcde88d8&action=category&catid=%24catid&order=listorder+asc&num=1\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'category')) {$data = $content_tag->category(array('catid'=>$catid,'order'=>'listorder asc','limit'=>'1',));}?>
						<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
						<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"get\" data=\"op=get&tag_md5=99f2b5f981ac51d17d9d2f96f12b8280&sql=select+content+from+sy_page+where+catid%3D%24r%5Bcatid%5D&return=data1\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">编辑</a>";}pc_base::load_sys_class("get_model", "model", 0);$get_db = new get_model();$r = $get_db->sql_query("select content from sy_page where catid=$r[catid] LIMIT 20");while(($s = $get_db->fetch_next()) != false) {$a[] = $s;}$data1 = $a;unset($a);?>
						<?php echo $data1['0']['content'];?>
						<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
						<?php $n++;}unset($n); ?>

						<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
						<?php } ?>
            </div>
            <?php } ?>
        </div>
    </div>

<?php include template("content","tj_news","sysx_m"); ?>
<?php include template("content","tj_pro","sysx_m"); ?>
<?php include template("content","foot","sysx_m"); ?>